<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>用户中心</title>
    <meta name="keywords"  content="DeathGhost" />
    <meta name="description" content="DeathGhost" />
    <meta name="author" content="DeathGhost,deathghost@deathghost.cn">
    <link rel="stylesheet" type="text/css" href="css/style1.css" />

    <!-- 先引入重置的CSS样式文件 -->
    <link rel="stylesheet" href="./css/reset.css">

    <!-- 引入字体图标的css文件 -->
    <link rel="stylesheet" href="./css/iconfont.css">

    <!-- 引入当前页面的CSS文件 -->
    <link rel="stylesheet" href="./css/index.css">
    <script src="js/user.js"></script>
    <script src="js/jquery-3.5.0.min.js"></script>
    <script>
        $(document).ready(function(){
            $("nav .indexAsideNav").hide();
            $("nav .category").mouseover(function(){
                $(".asideNav").slideDown();
            });
            $("nav .asideNav").mouseleave(function(){
                $(".asideNav").slideUp();
            });
        });
    </script>
</head>
<body>
<div class="container">
<script type="text/javascript" charset="utf-8" src="./js/header1.js"></script>

<section class="wrap user_center_wrap" style="padding-top: 50px">
    <!--左侧导航-->
    <aside class="user_aside_nav">
        <dl>
            <dt>买家中心</dt>
            <dd><a href="order_list.html">我的订单</a></dd>
            <dd><a href="price_list.html">我的询价单</a></dd>
            <dd><a href="favorite.html">我的收藏</a></dd>
            <dd><a href="address.html">我的地址库</a></dd>
        </dl>
        <dl>
            <dt>商家管理中心</dt>
            <dd><a href="authenticate.html">我要开店</a></dd>
            <dd><a href="setting.html">店铺设置</a></dd>
            <dd><a href="seller_product_list.html">商品列表</a></dd>
            <dd><a href="seller_order_list.html">订单列表</a></dd>
            <dd><a href="offer_list.html">询价单</a></dd>
        </dl>
        <dl>
            <dt>控制面板</dt>
            <dd><a href="message.html">站内短消息</a></dd>
            <dd><a href="account.html">资金管理</a></dd>
            <dd><a href="profile.html">个人资料</a></dd>
            <dd><a href="change_password.html">修改密码</a></dd>
        </dl>
    </aside>
    <!--右侧：内容区域-->
    <div class="user_rt_cont">
        <div class="top_title">
            <strong><em>DeathGhost</em>欢迎回到用户中心</strong>
        </div>
        <!--用户信息-->
        <div class="user_factbook">
            <a href="" class="user_icon">
                <img src="" alt="" id="img_id" style="width: 100px">
                <span>修改头像</span>
            </a>
            <input type="file" onchange="showImg()" id="img_file" >
            <div class="user_infor">
                <p><strong id="my_name">DeathGhost</strong>（金酆年费VIP）<span class="user_vip unaccredited">未认证！</span><a href="authenticate.html">申请入驻</a></p><!--**未认证的class值为"unaccredited"**-->
                <p>上次登录时间：<time>2013-01-14 13:55</time>，登录ip：192.168.1.1</p>
                <p>账户余额：<strong class="rmb_icon" id="my_userBalance">0.00</strong><a href="account.html" class="btn">充值</a><a href="account.html" class="btn">提现</a></p>
            </div>
        </div>
        <!--买家订单提醒-->
        <dl class="user_order_tips">
            <dt>买家订单提醒</dt>
            <dd>
                <a href="order_list.html">
                    <strong>20</strong>
                    <em>待付款订单</em>
                </a>
            </dd>
            <dd>
                <a href="order_list.html">
                    <strong>10</strong>
                    <em>待发货订单</em>
                </a>
            </dd>
            <dd>
                <a href="order_list.html">
                    <strong>30</strong>
                    <em>待确认订单</em>
                </a>
            </dd>
            <dd>
                <a href="order_list.html">
                    <strong>15</strong>
                    <em>待评价订单</em>
                </a>
            </dd>
        </dl>
        <!--卖家订单提醒-->
        <dl class="user_order_tips">
            <dt>卖家订单提醒</dt>
            <dd>
                <a href="#">
                    <strong>9</strong>
                    <em>待付款订单</em>
                </a>
            </dd>
            <dd>
                <a href="#">
                    <strong>10</strong>
                    <em>待发货订单</em>
                </a>
            </dd>
            <dd>
                <a href="#">
                    <strong>20</strong>
                    <em>待评价订单</em>
                </a>
            </dd>
            <dd>
                <a href="#">
                    <strong>2</strong>
                    <em>退换货订单</em>
                </a>
            </dd>
        </dl>
    </div>
</section>

<script type="text/javascript" charset="utf-8" src="./js/tail1.js"></script>
</div>
</body>



<script language="JavaScript">


    $(function () {
        refreshBalance();
    });



    function refreshBalance() {

        $("#my_userBalance").html();
        $("#my_name").html();

        let dbUser = localStorage.getItem("userInfo");

        let obj = JSON.parse(dbUser);

        let balance = obj.userBalance;
        let name = obj.userName;

        $("#my_userBalance").html(balance);
        $("#my_name").html("用户名："+name);

    }


    function showImg() {
        let file =  document.getElementById('img_file').files[0];
        let re = new FileReader();
        re.readAsDataURL(file);
        re.onload = function(re){
            $('#img_id').attr("src", re.target.result);
        }
    }
</script>


</html>